From a386b5946f7ee67e82822c5fb34aeec85d7d2d6c Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Fri, 6 May 2005 09:51:46 +0000 Subject: [PATCH] bitkeeper revision 1.1389.5.24 (427b3e32MTKLAKufH_gNCYPoIbG71g) Xen can parse the ACPI tables to get IOAPIC information -- we can rely on domain0 to fill in information we miss because Xen lacks an ACPI interpreter. Signed-off-by: Keir Fraser --- xen/arch/x86/acpi.c | 12 ++++++++++-- xen/arch/x86/mpparse.c | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/acpi.c b/xen/arch/x86/acpi.c index 8df006478a..4d3cc212b1 100644 --- a/xen/arch/x86/acpi.c +++ b/xen/arch/x86/acpi.c @@ -189,7 +189,7 @@ acpi_parse_lapic_nmi ( #endif /*CONFIG_X86_LOCAL_APIC*/ -#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER) +#if defined(CONFIG_X86_IO_APIC) /*&& defined(CONFIG_ACPI_INTERPRETER)*/ static int __init acpi_parse_ioapic ( @@ -211,6 +211,7 @@ acpi_parse_ioapic ( return 0; } +#ifdef CONFIG_ACPI_INTERPRETER /* * Parse Interrupt Source Override for the ACPI SCI */ @@ -244,6 +245,7 @@ acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger) acpi_sci_override_gsi = gsi; return; } +#endif static int __init acpi_parse_fadt(unsigned long phys, unsigned long size) @@ -277,11 +279,13 @@ acpi_parse_int_src_ovr ( acpi_table_print_madt_entry(header); +#ifdef CONFIG_ACPI_INTERPRETER if (intsrc->bus_irq == acpi_fadt.sci_int) { acpi_sci_ioapic_setup(intsrc->global_irq, intsrc->flags.polarity, intsrc->flags.trigger); return 0; } +#endif mp_override_legacy_irq ( intsrc->bus_irq, @@ -460,13 +464,14 @@ acpi_boot_init (void) #endif /*CONFIG_X86_LOCAL_APIC*/ -#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER) +#if defined(CONFIG_X86_IO_APIC) /*&& defined(CONFIG_ACPI_INTERPRETER)*/ /* * I/O APIC * -------- */ +#if 0 /* * ACPI interpreter is required to complete interrupt setup, * so if it is off, don't enumerate the io-apics with ACPI. @@ -476,6 +481,7 @@ acpi_boot_init (void) if (acpi_disabled || acpi_noirq) { return 1; } +#endif /* * if "noapic" boot option, don't look for IO-APICs @@ -510,12 +516,14 @@ acpi_boot_init (void) return result; } +#ifdef CONFIG_ACPI_INTERPRETER /* * If BIOS did not supply an INT_SRC_OVR for the SCI * pretend we got one so we can set the SCI flags. */ if (!acpi_sci_override_gsi) acpi_sci_ioapic_setup(acpi_fadt.sci_int, 0, 0); +#endif result = acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src); if (result < 0) { diff --git a/xen/arch/x86/mpparse.c b/xen/arch/x86/mpparse.c index 97c85aad53..6b4599fdf4 100644 --- a/xen/arch/x86/mpparse.c +++ b/xen/arch/x86/mpparse.c @@ -1017,7 +1017,7 @@ void __init mp_register_lapic ( MP_processor_info(&processor); } -#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER) +#if defined(CONFIG_X86_IO_APIC) /*&& defined(CONFIG_ACPI_INTERPRETER)*/ #define MP_ISA_BUS 0 #define MP_MAX_IOAPIC_PIN 127 @@ -1085,7 +1085,7 @@ void __init mp_register_ioapic ( mp_ioapic_routing[idx].irq_end = irq_base + io_apic_get_redir_entries(idx); - printk("IOAPIC[%d]: apic_id %d, version %d, address 0x%lx, " + printk("IOAPIC[%d]: apic_id %d, version %d, address 0x%x, " "IRQ %d-%d\n", idx, mp_ioapics[idx].mpc_apicid, mp_ioapics[idx].mpc_apicver, mp_ioapics[idx].mpc_apicaddr, mp_ioapic_routing[idx].irq_start, -- 2.30.2